package tuanda.soict.firstsun.ClickListenerPackage;

import tuanda.soict.firstsun.PresentationPackage.ControlMenu;

import com.badlogic.gdx.scenes.scene2d.Actor;

public class SelectedElementClickListener extends AbstractClickListener{

	private ControlMenu controlMenu;
	
	public SelectedElementClickListener(int id,ControlMenu control) {
		super(id);
		setControlMenu(control);
	}
	
	@Override
	public void click(Actor actor, float x, float y) {
		controlMenu.setSelectedElement(ID);
		controlMenu.createBuyScreen();
	}

	public ControlMenu getControlMenu() {
		return controlMenu;
	}

	public void setControlMenu(ControlMenu control) {
		this.controlMenu = control;
	}
}
